<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>animation动画组合定义语法</title>
  <style>
    * {
      padding: 0;
      margin: 0;
    }
    body {
      display: grid;
      width: 100vw;
      height: 100vh;
      background-color: #34495e;
    }
    ul {
      display: grid;
      grid-template: 1fr/repeat(4,1fr);
      list-style: none;
      background-color: #000;
      width: 400px;
      height: 100px;
      align-self: center;
      justify-self: center;
    }
    li {
      width: 100px;
      height: 100px;
      line-height: 100px;
      text-align: center;
      border-radius: 50%;
      background-color: #e67e22;
    }
    li:nth-child(1) {
      /* name/duration/delay */
      animation: hd 2s 2s;
    }
    li:nth-child(2) {
      /* name/fill-mode/duration/delay */
      animation: hd backwards 2s 2s;
    }
    li:nth-child(3) {
      /* name/fill-mode/duration/delay */
      animation: hd forwards 2s 2s;
    }
    li:nth-child(4) {
      /* name/fill-mode/duration/delay */
      animation: hd both 2s 2s;
    }
    @keyframes hd {
      0% {
        transform: scale(0);
      }
      100% {
        transform: scale(1);
        background-color: aquamarine;
      }
    }
  </style>
</head>
<body>
  <ul>
    <li>normal</li>
    <li>backwards</li>
    <li>forwards</li>
    <li>both</li>
  </ul>
</body>
</html>